#!/usr/bin/env python


import dicts
import heuristics
import sonnet


def construct_pron(word):
    pron = heuristics.compound_word(word)
    if pron is not None:
        print word
    return pron


def construct_pron_dict(words):
    pron_dict = dicts.PronDict()
    new_pron_dict = {}
    for word in words:
        # Our pronunciations are always lists, because some words have more
        # than one correct pronunciation (even though the majority of words
        # only have one pronunciation).  So when we construct pronunciations
        # for unknown Shakespeare words, we shove each of those
        # pronunciations into a list as well, just to keep our data
        # structures parallel, to avoid future headaches.
        new_pron_dict[word] = [construct_pron(word)]
    return new_pron_dict


def main():
    unknown_sonnet_words = sonnet.get_interesting_words()
    new_pron_dict = construct_pron_dict(unknown_sonnet_words)


if __name__ == '__main__':
    main()
